From a80998127ce779b156df50e8d1ebaa4eedab31b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 21 Mar 2013 08:51:35 -0400 Subject: [PATCH] wayland: Clear current cusor on leave so we always set it on enter Commit 0d9d808217a04ee965ce5f60f9aff00b2ec4938e fixed the hotspot issue, but commit f2cc52fddd74b3064eec85e17161ebbc4ee14f49 then optimized away cursor changes a little too aggressively. We always need to set the cursor on enter. Make sure we clear the current cursor on leave so we don't think it's already set on the next enter. https://bugzilla.gnome.org/show_bug.cgi?id=695512 --- gdk/wayland/gdkdevice-wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 3cdf938c31..7bf2e0521f 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -622,6 +622,12 @@ pointer_handle_leave (void *data, device, device->pointer_focus)); g_object_unref(device->pointer_focus); + if (device->cursor) + { + g_object_unref (device->cursor); + device->cursor = NULL; + } + device->pointer_focus = NULL; } -- 2.30.2